package com.xsh.gls.mapper;

import com.xsh.gls.pojo.Order;
import com.xsh.gls.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByUserName(String userName);

    List<User> selectByTypeID(Integer typeid);

    User selectByPhone(String phone);

    User selectByUserNameOld(@Param("userName")String userName,@Param("oldUserName")String oldUserName);

    User selectByPhoneOld(@Param("phone")String phone,@Param("oldPhone")String oldPhone);

    List<User> selectAll(@Param("userName") String userName, @Param("s_Address")String sAddress,@Param("typeId") Integer typeId);

    int updatePwdById(@Param("password")String password,@Param("id")Integer id);

    User selectUserById(Integer id);

    int updateTypeById(Integer id);

    List<Order> orderSelectByOwn(String orderNumber, int CusId);

    int upeateById(Integer typeid);
}